#ifndef GovSteamFV4_H
#define GovSteamFV4_H
/*
Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen
*/

#include <list>
#include <map>
#include <string>
#include <unordered_map>

#include "TurbineGovernorDynamics.hpp"
#include "BaseClassDefiner.hpp"
#include "CGMESProfile.hpp"
#include "Float.hpp"
#include "PU.hpp"
#include "Seconds.hpp"

namespace CIMPP
{

	/*
	Detailed electro-hydraulic governor for steam unit.
	*/
	class GovSteamFV4 : public TurbineGovernorDynamics
	{
	public:
		/* constructor initialising all attributes to null */
		GovSteamFV4();
		~GovSteamFV4() override;

		CIMPP::PU cpsmn;  /* Minimum value of pressure regulator output (&lt;i&gt;Cpsmn&lt;/i&gt;).  Typical value = -1. Default: nullptr */
		CIMPP::PU cpsmx;  /* Maximum value of pressure regulator output (&lt;i&gt;Cpsmx&lt;/i&gt;).  Typical value = 1. Default: nullptr */
		CIMPP::PU crmn;  /* Minimum value of regulator set-point (&lt;i&gt;Crmn&lt;/i&gt;).  Typical value = 0. Default: nullptr */
		CIMPP::PU crmx;  /* Maximum value of regulator set-point (&lt;i&gt;Crmx&lt;/i&gt;).  Typical value = 1,2. Default: nullptr */
		CIMPP::PU kdc;  /* Derivative gain of pressure regulator (&lt;i&gt;Kdc&lt;/i&gt;).  Typical value = 1. Default: nullptr */
		CIMPP::PU kf1;  /* Frequency bias (reciprocal of droop) (&lt;i&gt;Kf1&lt;/i&gt;).  Typical value = 20. Default: nullptr */
		CIMPP::PU kf3;  /* Frequency control (reciprocal of droop) (&lt;i&gt;Kf3&lt;/i&gt;).  Typical value = 20. Default: nullptr */
		CIMPP::PU khp;  /* Fraction  of total turbine output generated by HP part (&lt;i&gt;Khp&lt;/i&gt;).  Typical value = 0,35. Default: nullptr */
		CIMPP::PU kic;  /* Integral gain of pressure regulator (&lt;i&gt;Kic&lt;/i&gt;).  Typical value = 0,0033. Default: nullptr */
		CIMPP::PU kip;  /* Integral gain of pressure feedback regulator (&lt;i&gt;Kip&lt;/i&gt;).  Typical value = 0,5. Default: nullptr */
		CIMPP::PU kit;  /* Integral gain of electro-hydraulic regulator (&lt;i&gt;Kit&lt;/i&gt;).  Typical value = 0,04. Default: nullptr */
		CIMPP::PU kmp1;  /* First gain coefficient of  intercept valves characteristic (&lt;i&gt;Kmp1&lt;/i&gt;).  Typical value = 0,5. Default: nullptr */
		CIMPP::PU kmp2;  /* Second gain coefficient of intercept valves characteristic (&lt;i&gt;Kmp2&lt;/i&gt;).  Typical value = 3,5. Default: nullptr */
		CIMPP::PU kpc;  /* Proportional gain of pressure regulator (&lt;i&gt;Kpc&lt;/i&gt;).  Typical value = 0,5. Default: nullptr */
		CIMPP::PU kpp;  /* Proportional gain of pressure feedback regulator (&lt;i&gt;Kpp&lt;/i&gt;).  Typical value = 1. Default: nullptr */
		CIMPP::PU kpt;  /* Proportional gain of electro-hydraulic regulator (&lt;i&gt;Kpt&lt;/i&gt;).  Typical value = 0,3. Default: nullptr */
		CIMPP::PU krc;  /* Maximum variation of fuel flow (&lt;i&gt;Krc&lt;/i&gt;).  Typical value = 0,05. Default: nullptr */
		CIMPP::PU ksh;  /* Pressure loss due to flow friction in the boiler tubes (&lt;i&gt;Ksh&lt;/i&gt;).  Typical value = 0,08. Default: nullptr */
		CIMPP::PU lpi;  /* Maximum negative power error (&lt;i&gt;Lpi&lt;/i&gt;).  Typical value = -0,15. Default: nullptr */
		CIMPP::PU lps;  /* Maximum positive power error (&lt;i&gt;Lps&lt;/i&gt;).  Typical value = 0,03. Default: nullptr */
		CIMPP::PU mnef;  /* Lower limit for frequency correction (&lt;i&gt;MN&lt;/i&gt;&lt;i&gt;&lt;sub&gt;EF&lt;/sub&gt;&lt;/i&gt;).  Typical value = -0,05. Default: nullptr */
		CIMPP::PU mxef;  /* Upper limit for frequency correction (&lt;i&gt;MX&lt;/i&gt;&lt;i&gt;&lt;sub&gt;EF&lt;/sub&gt;&lt;/i&gt;).  Typical value = 0,05. Default: nullptr */
		CIMPP::PU pr1;  /* First value of pressure set point static characteristic (&lt;i&gt;Pr1&lt;/i&gt;).  Typical value = 0,2. Default: nullptr */
		CIMPP::PU pr2;  /* Second value of pressure set point static characteristic, corresponding to &lt;i&gt;Ps0&lt;/i&gt; = 1,0 PU (&lt;i&gt;Pr2&lt;/i&gt;).  Typical value = 0,75. Default: nullptr */
		CIMPP::PU psmn;  /* Minimum value of pressure set point static characteristic (&lt;i&gt;Psmn&lt;/i&gt;).  Typical value = 1. Default: nullptr */
		CIMPP::PU rsmimn;  /* Minimum value of integral regulator (&lt;i&gt;Rsmimn&lt;/i&gt;).  Typical value = 0. Default: nullptr */
		CIMPP::PU rsmimx;  /* Maximum value of integral regulator (&lt;i&gt;Rsmimx&lt;/i&gt;).  Typical value = 1,1. Default: nullptr */
		CIMPP::PU rvgmn;  /* Minimum value of integral regulator (&lt;i&gt;Rvgmn&lt;/i&gt;).  Typical value = 0. Default: nullptr */
		CIMPP::PU rvgmx;  /* Maximum value of integral regulator (&lt;i&gt;Rvgmx&lt;/i&gt;).  Typical value = 1,2. Default: nullptr */
		CIMPP::PU srmn;  /* Minimum valve opening (&lt;i&gt;Srmn&lt;/i&gt;).  Typical value = 0. Default: nullptr */
		CIMPP::PU srmx;  /* Maximum valve opening (&lt;i&gt;Srmx&lt;/i&gt;).  Typical value = 1,1. Default: nullptr */
		CIMPP::PU srsmp;  /* Intercept valves characteristic discontinuity point (&lt;i&gt;Srsmp&lt;/i&gt;).  Typical value = 0,43. Default: nullptr */
		CIMPP::Float svmn;  /* Maximum regulator gate closing velocity (&lt;i&gt;Svmn&lt;/i&gt;).  Typical value = -0,0333. Default: 0.0 */
		CIMPP::Float svmx;  /* Maximum regulator gate opening velocity (&lt;i&gt;Svmx&lt;/i&gt;).  Typical value = 0,0333. Default: 0.0 */
		CIMPP::Seconds ta;  /* Control valves rate opening time (&lt;i&gt;Ta&lt;/i&gt;) (&amp;gt;= 0).  Typical value = 0,8. Default: nullptr */
		CIMPP::Seconds tam;  /* Intercept valves rate opening time (&lt;i&gt;Tam&lt;/i&gt;) (&amp;gt;= 0).  Typical value = 0,8. Default: nullptr */
		CIMPP::Seconds tc;  /* Control valves rate closing time (&lt;i&gt;Tc&lt;/i&gt;) (&amp;gt;= 0).  Typical value = 0,5. Default: nullptr */
		CIMPP::Seconds tcm;  /* Intercept valves rate closing time (&lt;i&gt;Tcm&lt;/i&gt;) (&amp;gt;= 0).  Typical value = 0,5. Default: nullptr */
		CIMPP::Seconds tdc;  /* Derivative time constant of pressure regulator (&lt;i&gt;Tdc&lt;/i&gt;) (&amp;gt;= 0).  Typical value = 90. Default: nullptr */
		CIMPP::Seconds tf1;  /* Time constant of fuel regulation (&lt;i&gt;Tf1&lt;/i&gt;) (&amp;gt;= 0).  Typical value = 10. Default: nullptr */
		CIMPP::Seconds tf2;  /* Time constant of steam chest (&lt;i&gt;Tf2&lt;/i&gt;) (&amp;gt;= 0).  Typical value = 10. Default: nullptr */
		CIMPP::Seconds thp;  /* High pressure (HP) time constant of the turbine (&lt;i&gt;Thp&lt;/i&gt;) (&amp;gt;= 0).  Typical value = 0,15. Default: nullptr */
		CIMPP::Seconds tmp;  /* Low pressure (LP) time constant of the turbine (&lt;i&gt;Tmp&lt;/i&gt;) (&amp;gt;= 0).  Typical value = 0,4. Default: nullptr */
		CIMPP::Seconds trh;  /* Reheater  time constant of the turbine (&lt;i&gt;Trh&lt;/i&gt;) (&amp;gt;= 0).  Typical value = 10. Default: nullptr */
		CIMPP::Seconds tv;  /* Boiler time constant (&lt;i&gt;Tv&lt;/i&gt;) (&amp;gt;= 0).  Typical value = 60. Default: nullptr */
		CIMPP::Seconds ty;  /* Control valves servo time constant (&lt;i&gt;Ty&lt;/i&gt;) (&amp;gt;= 0).  Typical value = 0,1. Default: nullptr */
		CIMPP::PU y;  /* Coefficient of linearized equations of turbine (Stodola formulation) (&lt;i&gt;Y&lt;/i&gt;).  Typical value = 0,13. Default: nullptr */
		CIMPP::PU yhpmn;  /* Minimum control valve position (&lt;i&gt;Yhpmn&lt;/i&gt;).  Typical value = 0. Default: nullptr */
		CIMPP::PU yhpmx;  /* Maximum control valve position (&lt;i&gt;Yhpmx&lt;/i&gt;).  Typical value = 1,1. Default: nullptr */
		CIMPP::PU ympmn;  /* Minimum intercept valve position (&lt;i&gt;Ympmn&lt;/i&gt;).  Typical value = 0. Default: nullptr */
		CIMPP::PU ympmx;  /* Maximum intercept valve position (&lt;i&gt;Ympmx&lt;/i&gt;).  Typical value = 1,1. Default: nullptr */

		static const char debugName[];
		const char* debugString() const override;

		std::list<CGMESProfile> getPossibleProfilesForClass() const override;
		std::map<std::string, std::list<CGMESProfile>> getPossibleProfilesForAttributes() const override;

		static void addConstructToMap(std::unordered_map<std::string, BaseClass* (*)()>& factory_map);
		static void addPrimitiveAssignFnsToMap(std::unordered_map<std::string, assign_function>& assign_map);
		static void addClassAssignFnsToMap(std::unordered_map<std::string, class_assign_function>& assign_map);
		void addPrimitiveGetFnsToMap(std::map<std::string, get_function>& get_map) const override;
		void addClassGetFnsToMap(std::map<std::string, class_get_function>& get_map) const override;
		void addEnumGetFnsToMap(std::map<std::string, get_function>& get_map) const override;
		static const BaseClassDefiner declare();
	};

	BaseClass* GovSteamFV4_factory();
}
#endif
